namespace RAG.Application.Dtos.Knowledge;

public class KnowledgeItemDto
{
    public Guid Id { get; set; }
    public Guid DocumentId { get; set; }
    public string DocumentTitle { get; set; } = string.Empty;
    public string Title { get; set; } = string.Empty; // 知识条目标题（可能与文档标题一致）
    public int ChunkIndex { get; set; }
    public string Preview { get; set; } = string.Empty; // 前 100 字
    public int ContentLength { get; set; }
    public string DocumentType { get; set; } = string.Empty;
    public string EmbeddingType { get; set; } = string.Empty;
    public int EmbeddingDimensions { get; set; }
    public string? Source { get; set; }
    public DateTime CreatedAt { get; set; }
}

public class KnowledgeItemDetailDto : KnowledgeItemDto
{
    public string FullContent { get; set; } = string.Empty;
    public string? Metadata { get; set; }
    public bool IsChunked { get; set; }
}

public class KnowledgeItemQuery
{
    public string? Keyword { get; set; }
    public Guid? DocumentId { get; set; }
    public string? DocumentType { get; set; }
    public int Page { get; set; } = 1;
    public int PageSize { get; set; } = 10;
}

public class PagedResult<T>
{
    public List<T> Items { get; set; } = new();
    public int TotalCount { get; set; }
    public int Page { get; set; }
    public int PageSize { get; set; }
}
